package org.beaconframework.ext.rs.jersey;

import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;

import com.sun.jersey.api.client.ClientResponse;

public class ResponseAdapter extends Response {

	ClientResponse clientResponse;
	public ResponseAdapter(ClientResponse r) {
		clientResponse = r;
	}
	
	
	@Override
	public Object getEntity() {
		return clientResponse.getEntityInputStream();
	}

	@Override
	public MultivaluedMap<String, Object> getMetadata() {
		throw new UnsupportedOperationException();
	}

	@Override
	public int getStatus() {
		return clientResponse.getStatus();
	}

}
